/*    */ package dm.jdbc.driver;
/*    */ 
/*    */ import dm.jdbc.dataConvertion.Convertion;
/*    */ import dm.jdbc.dbaccess.DmMsgSend;
/*    */ import dm.jdbc.desc.ParameterDesc;
/*    */ import java.sql.SQLException;
/*    */ 
/*    */ public class DmNullBinder extends DmBinder
/*    */ {
/*    */   public DmNullBinder(DmdbPreparedStatement_bs pstmt)
/*    */   {
/* 12 */     super(pstmt);
/*    */   }
/*    */   
/*    */ 
/*    */   void init() {}
/*    */   
/*    */   public int bindData(DmMsgSend msg, int irow, int icol, boolean forBatch)
/*    */     throws SQLException
/*    */   {
/* 21 */     throw new SQLException("invalid call DmNullBinder.bindData");
/*    */   }
/*    */   
/*    */   public static final int bindData(DmMsgSend msg) throws SQLException {
/* 25 */     byte[] ret = Convertion.shortToByteArray(65534);
/*    */     
/* 27 */     return msg.appendBytes(ret, 0, ret.length);
/*    */   }
/*    */   
/*    */   void checkType(int icol, boolean forBatch) throws SQLException
/*    */   {
/* 32 */     if (this.m_checkType) {
/* 33 */       return;
/*    */     }
/* 35 */     this.m_checkType = true;
/*    */     
/* 37 */     if (this.paramsDesc == null) {
/* 38 */       this.paramsDesc = this.pstmt.getParamsDesc();
/*    */     }
/* 40 */     byte typeFlag = this.paramsDesc[icol].getTypeFlag();
/* 41 */     int dType = this.paramsDesc[icol].getDType();
/* 42 */     int prec = this.paramsDesc[icol].getPrec();
/* 43 */     int scale = this.paramsDesc[icol].getScale();
/* 44 */     byte ioType = this.paramsDesc[icol].getIOType();
/*    */     
/* 46 */     this.destIoType = ioType;
/* 47 */     this.srcScale = scale;
/*    */     
/* 49 */     if (dType == 54) {
/* 50 */       this.destDType = 2;
/* 51 */       this.destPrec = 8188;
/* 52 */       this.destScale = 0;
/* 53 */       return;
/*    */     }
/*    */     
/* 56 */     if ((ioType != 1) && 
/* 57 */       (typeFlag != 1)) {}
/* 58 */     switch (dType) {
/*    */     case 0: 
/*    */     case 1: 
/*    */     case 2: 
/* 62 */       this.destDType = 2;
/* 63 */       this.destPrec = 8188;
/* 64 */       break;
/*    */     case 17: 
/*    */     case 18: 
/* 67 */       this.destDType = 18;
/* 68 */       this.destPrec = 8188;
/* 69 */       break;
/*    */     default: 
/* 71 */       this.destDType = dType;
/* 72 */       this.destPrec = prec;
/* 73 */       this.destScale = scale;
/*    */       
/*    */ 
/* 76 */       break;
/* 77 */       this.destDType = dType;
/* 78 */       this.destPrec = prec;
/* 79 */       this.destScale = scale;
/*    */     }
/*    */   }
/*    */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\dm\jdbc\driver\DmNullBinder.class
 * Java compiler version: 2 (46.0)
 * JD-Core Version:       0.7.1
 */